package com.example.composableexample.util

import androidx.compose.foundation.layout.Column
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.window.Dialog

/**
 * author: LiLiang
 * createTime: 2022/9/30-16:36
 * remark:
 **/

@Preview
@Composable
fun TestScreen() {

    Column {
        ResetPassword("1", false)
        ResetPassword("2", true)
    }

}

@Composable
fun ResetPassword(password: String, isOpen: Boolean) {

    val openDialog = remember {
        mutableStateOf(isOpen)
    }

    if (openDialog.value) {
        Text(text = password)
    }
}

